import {request} from "./request.js"

/* 提币申请 */
export function applyExtract(method = 'get', data = {}) {
	return request({
		url: '/api/customers/withdraw/',
		// url: `/api/customers/withdraw/${data.id}/`,
		method: method,
		data: data
	})
}

/* 提币申请 管理员*/
export function applyExtractAdmin(method = 'get', data = {}) {
	return request({
		url: '/api/customers/userwithdraw/',
		// url: `/api/customers/withdraw/${data.id}/`,
		method: method,
		data: data
	})
}

/* 账户余额 */
export function getUserResidual(method = 'get', data = {}) {
	return request({
		url: '/api/customers/userasset/',
		method: method,
		data
	})
}

export function getResidual(method = 'get', data = {}) {
	return request({
		url: '/api/customers/asset/',
		method: method
	})
}

/* 账户交易记录 */
export function adminTrading(method = 'get', data = {}) {
	return request({
		url: '/api/customers/usertransaction/',
		method: method,
		data: data
	})
}

export function userTrading(method = 'get', data = {}) {
	return request({
		url: '/api/customers/transaction/',
		method: method,
		data: data
	})
}